<?php
    require_once 'core/config.php';
    require_once 'core/string_helper.php';
    require_once 'core/url_helper.php';
    require_once 'core/loader.php';
    require_once 'core/file_helper.php';
    
    
    $model = load_model('crash_model');
    if (empty($_POST['id'])) {
        echo "No crash passed";
        exit();
    }
    $crash_id = $_POST['id'];

    if ($model->remove(array('id'=>$crash_id))) {
        echo "Success!";
    } else {
        echo "0";
    }
?>